home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / oisac2 / l_5290.txt < prev    next >
Text File  |  1994-03-01  |  1KB  |  34 lines

  1. 5 ONERRORGOTO500
  2. 10 MODE8:DIM:c$=CHR$(5)
  3. 20 CLS:PRINT"Kn(x)         (0ónó9,0<xó10)";
  4. 30 LOCATE0,1:PRINTc$;"n?   :x?      :K=";
  5. 40 LOCATE2,1:INPUT@3;n$:LOCATE0,0:n=VALF(LEFT$(n$,3)):u=ABSn:IFn<0 ORu>=10 ORFRACu<>0 THEN450
  6. 60 LOCATE8,1:INPUT@6;x$:LOCATE0,0:x=VALF(LEFT$(x$,6)):v=ABSx:IFx=<0 ORv>10 THEN460
  7. 80 LOCATE17,1:PRINT" .....";:GOSUB200
  8. 100 IFx<0 THENr=r*(-1)^u
  9. 110 IFr<>0 ANDABSr>=1e-90 THENr=ROUND(r,LOG(ABSr)-7)
  10. 115 IFr<>0 ANDABSr<1e-90 THENr=r*1e10:r=ROUND(r,LOG(ABSr)-7):r=r/1e10
  11. 120 LOCATE18,1:PRINT"     ";:LOCATE17,1:PRINTr;:z$=INPUT$(1,@):GOTO30
  12. 200 IFv>2 THEN400
  13. 210 c=0:b=1E-99:s=0
  14. 220 FORk=11 TO0 STEP-1:a=2*(k+1)*b/v+c:s=s+a:c=b:b=a:NEXT
  15. 230 s=2*s-a:d=a/s*EXP(v)
  16. 240 w=v/2:e=-LN(w)*d-.5772157+.4227842*w^2+.2306976*w^4+.0348859*w^6+.002627*w^8+.0001075*w^10+.0000074*w^12
  17. 250 IFn=0 THENr=e:RETURN
  18. 260 f=(c/s)*EXP(v):g=(1/v-f*e)/d
  19. 270 IFu=1 THENr=g:RETURN
  20. 300 a=e:b=g
  21. 310 FORi=1 TOu-1:c=2*i*b/v+a:a=b:b=c:NEXT
  22. 320 r=c:RETURN
  23. 400 w=2/v:e=(1.2533141-.0783236*w+.0218957*w^2-.0106245*w^3+.0058787*w^4-.0025154*w^5+.0005321*w^6)*EXP(-v)/SQRv
  24. 410 IFn=0 THENr=e:RETURN
  25. 420 g=(1.2533141+.2349862*w-.0365562*w^2+.0150427*w^3-.0078035*w^4+.0032561*w^5-.0006825*w^6)*EXP(-v)/SQRv
  26. 430 IFu=1 THENr=g:RETURN
  27. 440 GOTO300
  28. 450 LOCATE2,1:PRINT"   ";:GOTO40
  29. 460 LOCATE8,1:PRINT"      ";:GOTO60
  30. 500 IFERR=1 THENCLS:ONERRORGOTO0
  31. 510 IFERL=40 THENRESUME450
  32. 520 IFERL=60 THENRESUME460
  33. 530 LOCATE17,1:PRINT"not found";:z$=INPUT$(1,@):RESUME20
  34.